{% extends 'backend/index.html' %}
{% load staticfiles %}
{% block title %}
    <title>文章管理-后台管理中心</title>
{% endblock %}
<div class="content">
    {% block content %}

            <div class="nav-left"><h4>文章管理</h4></div>
        <div class="nav-middle">搜索</div>
            <div class="nav-right"><a href="article_add" class="btn btn-info">添加文章</a></div>
    <div>
    <table align="center" class="table table-hover table-bordered">
        <thead>
        <tr>
            <th>ID</th>
            <th>标题</th>
            <th>作者</th>
            <th>发布时间</th>
            <th>分类</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
            {% for row in article_list %}
                <tr>
                <td>
                    {{ row.id }}
                </td>
                     <td>
                    {{ row.title }}
                </td>
                <td>
                    {{ row.author }}
                </td>
                <td>
                   {{ row.create_time }}
                </td>
                <td>
                   {{ row.classify }}
                </td>
                <td>
                    <a href="article_delete?nid={{ row.id }}">删除</a>
                    |<a href="article_edit?nid={{ row.id }}">编辑</a>
                    |<a href="/article.html?nid={{ row.id }}"> 预览 </a>
                </td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
    <ul class="pagination pagination-sm">
        {{ page_obj.page_str|safe }}
      </ul>
<p>共{{ article_list.count }}条</p>
    {% endblock %}